package com.pig4cloud.pig.village.welfare.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pig4cloud.pig.village.api.entity.Welfare;
import com.pig4cloud.pig.village.api.entity.WelfareRule;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author limbray.li
 * @date 2021/6/19
 */
@Mapper
public interface WelfareRuleMapper extends BaseMapper<WelfareRule> {
	@InterceptorIgnore(tenantLine = "true")
	List<WelfareRule> getAllRules();

	/**
	 * sql中注明了：welfareCode != birthday,time_dimension == 1
	 * @return
	 */
	@InterceptorIgnore(tenantLine = "true")
	List<WelfareRule> getMonthRules();

	/**
	 * sql中注明了：welfareCode != birthday,time_dimension == 0
	 * @return
	 */
	@InterceptorIgnore(tenantLine = "true")
	List<WelfareRule> getYearRules();
	/**
	 * sql中注明了：welfareCode == birthday
	 * @return
	 */
	@InterceptorIgnore(tenantLine = "true")
	List<WelfareRule> getBirthDayRules();

	/**
	 * sql中注明了：welfareCode != birthday,time_dimension == 2,fund_code == grantFund
	 * @return
	 */
	@InterceptorIgnore(tenantLine = "true")
	List<WelfareRule> getSchoolRules();
}
